/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ecouteurs;

import controleur.RunParcours;
import ia_multiagent1.Agent;
import ia_multiagent1.Espace2D;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Vector;
import javax.swing.JTextField;

/**
 *
 * @author Baptiste
 */

public class EcouteurParcours implements MouseListener{
 
    private Vector<Agent> agents;
    private JTextField txt;
    private int dimGridCases;
    private int dimPixelCase;
    private Espace2D e2d;
    
    public EcouteurParcours(Vector<Agent> agents, JTextField txt, int dimGridCases, int dimPixelCase, Espace2D e2d) {
        this.agents = agents;
        this.txt = txt;
        this.dimGridCases = dimGridCases;
        this.dimPixelCase = dimPixelCase;
        this.e2d = e2d;
    }

    public void mouseClicked(MouseEvent e) {
        new Thread(new RunParcours(agents, txt, dimGridCases, dimPixelCase, e2d)).start();
    }

    public void mousePressed(MouseEvent e) {
      //   throw new UnsupportedOperationException("Not supported yet.");
      
    }

    public void mouseReleased(MouseEvent e) {
     //   throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mouseEntered(MouseEvent e) {
    //    throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mouseExited(MouseEvent e) {
    //    throw new UnsupportedOperationException("Not supported yet.");
    }
    
    public void setAgents(Vector<Agent> mesAgents){
        this.agents = mesAgents;
    }

}
